Fix a post-request crasher when we try to do sandbox reuse#22
Merged
Conversation
With compression, a board size of 45 no longer crashes. Move the talk of limits to the place where we
9458106 to
6dce28f
Compare
…indicating "there are no more requests this session". It's an `optional` in the WIT, though it never returned `None` before. I suspect multi-request is never happening anymore. Perhaps something changed in Viceroy, but this crash happens in Viceroy's `erik/python-sdk-compatible-2` and `main` (80c9e1486e5bbe559ec0194714bb668988984993). The crash happens *after* the request is served, so CI didn't catch it. It does now. Also add tests for Game Of Life.
posborne
reviewed
Nov 26, 2025
|
|
||
| # The error about failed sandbox reuse comes *after* the request has | ||
| # succeeded. And it seems to take forever to show up. | ||
| sleep(4) # 2 is not enough. I am sad. |
Member
There was a problem hiding this comment.
Do you know why this is? Is this a latent gc collection or something else going on within viceroy's implementation?
Member
Author
There was a problem hiding this comment.
I really wish I knew. I didn't chase it to exhaustion. It manifested as a Heisenbug wherein my REPL explorations in the debugger (which generally took >4s) would turn up the message but the tests would not.
And now, futzing with it some more, it passes without the sleep. Let's see what CI does…
Member
Author
There was a problem hiding this comment.
Nm; I was testing it wrong—I forgot to comment out my bug fix. Anyway, I did find something interesting and make a small improvement: today, it needs only a .5s sleep.
4b12dbc to
b1e49f2
Compare
Today, it seems not to need as long. The unpredictability displeases me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deal with the case when
await_request()returnsNone, indicating "there are no more requests this session". It's anoptionalin the WIT, though I never saw this crash on my local machine when I first wrote the code. Perhaps something changed in Viceroy. The crash happens after the request is served, so CI didn't catch it before. Now it does, though it takes several secs to show up, which makes me very sad. But a slow, sleepy CI is better than an uncaught crasher.Also add more-ordinary tests for Game Of Life.